<%--
  Created by IntelliJ IDEA.
  User: chengongsuo
  Date: 2018/5/2
  Time: 3:22 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    session.setAttribute("username", "admin");
%>

<c:if test="${sessionScope.username == 'admin'}" var="cond" scope="page">
    超级用户登录。
</c:if>

${cond}


<c:choose>
    <c:when test="${sessionScope.usertype == 1}">
        您好，管理员！
    </c:when>

    <c:when test="${sessionScope.usertype == 2}">
        您好，普通用户！
    </c:when>
    <c:otherwise>
        您好，游客！
    </c:otherwise>
</c:choose>

</body>
</html>
